<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSystemRegionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_regions', function (Blueprint $table) {
            $table->increments('id')->comment('地区表');
            $table->string('region_name', 255)->nullable()->comment('地区名称');
            $table->char('region_code',20)->nullable() ->comment('地区代码');
            $table->tinyInteger('status')->nullable()->comment('状态（0不可用；1可用）')->default(0);
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_regions');
    }
}
